package com.bestv.search.engine.connection;

import org.apache.commons.httpclient.NameValuePair;

import java.io.InputStream;
import java.net.URL;

public interface IConnection {

    void connect(URL url);

    void connect(String url);

    InputStream request(byte[] out);

    InputStream request(byte[] out, int connectTimeout, int readTimeout);

    InputStream request(String out);

    InputStream request(String out, int connectTimeout, int readTimeout);

    InputStream request(NameValuePair[] pairs, int connectTimeout, int readTimeout);

    String requestStrResult(byte[] out);

    String requestStrResult(String out);

    void release();

}
